using CodePlex.DnD4eCampaignManager.DnD4e;
using NUnit.Framework;

namespace CodePlex.DnD4eCampaignManager.CampaignManagerTests.DnD4eTests
{
    [TestFixture]
    public class LocationTests
    {
        [Test]
        public void LocationHasDescription()
        {
            const string description = "This place looks awsome";
            Location location = new Location { Description = description };
            Assert.AreEqual(description, location.Description);
        }

        [Test]
        public void LocationHasDistances()
        {
            const string distances = "This place is awsomely close to other awsome places";
            Location location = new Location { Distances = distances };
            Assert.AreEqual(distances, location.Distances);
        }

        [Test]
        public void LocationHasName()
        {
            const string name = "Some place awesome";
            Location location = new Location { Name = name };
            Assert.AreEqual(name, location.Name);
        }

        [Test]
        public void LocationHasNPCs()
        {
            const string npcs = "There is this guy who is awsome";
            Location location = new Location { NonPlayerCharacters = npcs };
            Assert.AreEqual(npcs, location.NonPlayerCharacters);
        }

        [Test]
        public void IsEquatable()
        {
            Location primaryDomainObject = new Location { Name = "Hogwarts" };
            Location duplicateDomainObject = new Location { Name = "Hogwarts" };
            Location differentDomainObject = new Location { Name = "Diagon Alley" };

            TestHelpers.TestEquatabilityExcludingOperators(primaryDomainObject, duplicateDomainObject, differentDomainObject);
            Assert.IsTrue(primaryDomainObject == duplicateDomainObject);
            Assert.IsTrue(primaryDomainObject != differentDomainObject);
        }
    }
}